package Tools;

public class Rectangle extends PlaneFigure{
	private double a;
	private double b;
	private double c;
	private double s;
	public Rectangle(){
		
	}

	public Rectangle(String name,double a, double b) {
		super(name);
		this.a = a;
		this.b = b;
	}

	public double getA() {
		return a;
	}
	public void setA(double a) {
		this.a = a;
	}
	public double getB() {
		return b;
	}
	public void setB(double b) {
		this.b = b;
	}
	public void setC(double c) {
		this.c = c;
	}
	public void setS(double s) {
		this.s = s;
	}
	public double C(){  //getC()
		c = (a+b)*2;
		String cc = String.format("%.2f",c);
		double c = Double.parseDouble(cc);
		return c;	
	}
	public double S(){   //getS()
		s = a*b;
		String ss = String.format("%.2f",s);
		double s = Double.parseDouble(ss);
		return s;
	}

}